import ajax from './ajax'


//订单付款
export const payOrder = (oid,servicetime)=>ajax('http://www.bs.com/public/index.PHP/api/index/payOrder',{oid,servicetime});

//系统首页数据
export const getNums = ()=>ajax('http://www.bs.com/public/index.PHP/api/Admin/getNums');
//蔬菜列表
export const getVegetables = ()=>ajax('http://www.bs.com/public/index.PHP/api/Admin/getVegetables');
//添加蔬菜
export const addVegetables = (vname,price,xlleixing,pzleixing,shangjia)=>ajax('http://www.bs.com/public/index.PHP/api/Admin/addVegetables',{vname,price,xlleixing,pzleixing,shangjia});
//修改蔬菜
export const editVegetables = (vid,vname,price,xlleixing,pzleixing,shangjia)=>ajax('http://www.bs.com/public/index.PHP/api/Admin/editVegetables',{vid,vname,price,xlleixing,pzleixing,shangjia});
//获取一条蔬菜信息
export const getVegetableById = (vid)=>ajax('http://www.bs.com/public/index.PHP/api/Admin/getVegetableById',{vid});
//删除蔬菜商品
export const delVegetables = (vid)=>ajax('http://www.bs.com/public/index.PHP/api/Admin/delVegetables',{vid});
//供应商列表
export const getGongyingshang = ()=>ajax('http://www.bs.com/public/index.PHP/api/Admin/getGongyingshang');
//添加供应商
export const addGongyingshang = (gname,phone,email,dizhi)=>ajax('http://www.bs.com/public/index.PHP/api/Admin/addGongyingshang',{gname,phone,email,dizhi});
//得到gid的一条供应商信息
export const getEditGongyingshang = (gid)=>ajax('http://www.bs.com/public/index.PHP/api/Admin/getEditGongyingshang',{gid});
//编辑供应商信息
export const editGongyingshang = (gid,gname,phone,email,dizhi)=>ajax('http://www.bs.com/public/index.PHP/api/Admin/editGongyingshang',{gid,gname,phone,email,dizhi});
//获取所有会员信息
export const getMembers = ()=>ajax('http://www.bs.com/public/index.PHP/api/Admin/getMembers');
//启用用户
export const memberEnable = (uid)=>ajax('http://www.bs.com/public/index.PHP/api/Admin/memberEnable',{uid});
//禁用用户
export const memberDisable = (uid)=>ajax('http://www.bs.com/public/index.PHP/api/Admin/memberDisable',{uid});
//删除用户
export const memberDel = (uid)=>ajax('http://www.bs.com/public/index.PHP/api/Admin/memberDel',{uid});
//获取用户积分
export const getJifen = (token)=>ajax('http://www.bs.com/public/index.PHP/api/Admin/getJifen',{token});
//添加用户
export const regist = (username,zhanghao,password,mobile) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/regist',{username,zhanghao,password,mobile});
//生成鲜活密码柜
export const getxhgui = (zhanghao)=>ajax('http://www.bs.com/public/index.PHP/api/Admin/getxhgui',{zhanghao});
//生成一般密码柜
export const getybgui = (zhanghao)=>ajax('http://www.bs.com/public/index.PHP/api/Admin/getybgui',{zhanghao});
//手机号码验证码登录功能
export const savePhone = (mobile)=>ajax('http://www.bs.com/public/index.PHP/api/Admin/savePhone',{mobile});
//根据手机号码去用户表查询该手机号码是否已经被注册
export const verifyPhone = (mobile) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/verifyPhone',{mobile});
//根据账号去用户表查询该账号是否已经被注册
export const verifyZhangHao = (zhanghao) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/verifyZhangHao',{zhanghao});
//获得订单数据
export const getOrdermaster = () =>ajax('http://www.bs.com/public/index.PHP/api/Admin/getOrdermaster');
//删除订单
export const delOrder = (id) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/delOrder',{id});
//订单详情
export const getOrderDetail = (bianhao) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/getOrderDetail',{bianhao});

export const add_url = ()=>ajax('http://www.bs.com/public/index.PHP/api/Admin/add_url','','post');

//根据tokne获得收获人信息
export const getOrder = (token) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/getOrder',{token});
//发布采购信息
export const postInfo = (bianhao,token,jifen) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/postInfo',{bianhao,token,jifen});
//采购信息已经发布，禁用发布按钮
export const btnStatus = (bianhao) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/btnStatus',{bianhao});
//获取采购列表信息
export const getCaigou = () =>ajax('http://www.bs.com/public/index.PHP/api/Admin/getCaigou');
//采购订单审核不通过
export const orderDisable = (id,bianhao) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/orderDisable',{id,bianhao});
//采购订单审核通过
export const orderEnable = (id,bianhao) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/orderEnable',{id,bianhao});
//删除采购订单
export const orderDel = (id) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/orderDel',{id});
//获取用户信息token
export const getUserInfo = (token) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/getUserInfo',{token});
//计算用户获得积分次数
export const getJifenJL = (token) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/getJifenJL',{token});
//升级为会员
export const applyMem = (uid) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/applyMem',{uid});
//升级为采购员
export const applyCgy = (uid) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/applyCgy',{uid});
//一般投放柜列表
export const getYiban = () =>ajax('http://www.bs.com/public/index.PHP/api/Admin/getYiban');
//换柜
export const editGui = (uid) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/editGui',{uid});
//修改密码
export const editPass = (bianhao) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/editPass',{bianhao});
//鲜活投放柜列表
export const getXH = () =>ajax('http://www.bs.com/public/index.PHP/api/Admin/getXH');
//换柜
export const editXhGui = (uid) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/editXhGui',{uid});
//修改密码
export const editXhPass = (bianhao) =>ajax('http://www.bs.com/public/index.PHP/api/Admin/editXhPass',{bianhao});



